<style>
    .clear{width:100%;height:0;clear:both;}
    .alert{margin:1px 0;padding:10px 15px;background:#F5F5F5;}
    .item-show .reply-news-list-cover{width:30%;height:100px;float:right;overflow:hidden;}
    .item-show .reply-news-list-cover img{width:100%;height:auto;}
    .item-show .reply-news-list-detail{width:65%;float:left;overflow:hidden;height:auto}
    .item-show .reply-news-list-detail .help-block{margin:5px 0}

    .item-list-first .reply-news-list-cover{width:100%;height:200px;;overflow:hidden;}
    .item-list-first .reply-news-list-cover img{width:100%;height:auto;}
    .item-list-first .reply-news-list-detail{width:100%;position:absolute;bottom:0;left:0;overflow:hidden;height:50px;color:#FFF;filter:Alpha(opacity=70);background:#000;background:rgba(0, 0, 0, 0.7);text-shadow:none;font-family:arial,宋体b8b\4f53,sans-serif;}
    .item-list-first .help-block{padding:0 10px}
    .item-list-first .pull-right{position:absolute;bottom:10px;right:0}
</style>
<div class="panel panel-default">
    <div class="panel-heading">
        选择要展示的楼盘
    </div>
    <div class="panel-body">
        <div  id="new-reply" class="row {if empty($activity)}hide{/if}">
            <div class="reply-item">
              <input type="hidden" name="activity" value="{$activity['hid']}"/>
                <div class="col-sm-12 item-show  item-list-first" >
                    <div class="alert">
                        <div style="position:relative">
                            <div class="reply-news-list-cover">
                                <img src="{$showpicurl}"/>
                            </div>
                            <div class="reply-news-list-detail">
                                <span class="help-block title"><strong>{$activity['title']}</strong></span>
                                <span class="help-block content">{$activity['jianjie']}</span>
                            </div>
                            <div class="clear"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-12">
            <div class="alert" style="text-align:center;">
                <a href="javascript:;" class="btn btn-default" onclick="$('#modal-module-menus').modal();"><i class="fa fa-plus"></i> 选择要展示的项目</a>
            </div>
        </div>
    </div>
</div>
<div id="modal-module-menus"  class="modal fade" tabindex="-1">
    <div class="modal-dialog" style='width: 920px;'>
        <div class="modal-content">
             <div class="modal-header"><button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button><h3>选择要展示的项目</h3></div>
             <div class="modal-body" >  
                <div class="row">
                    <div class="input-group">
                        <input type="text" class="form-control" name="keyword" value="" id="search-kwd" placeholder="请输入名称" />
                         <span class='input-group-btn'><button type="button" class="btn btn-default" onclick="search_entries();">搜索</button></span>
                    </div>
                </div>
                <div id="module-menus" style="padding-top:5px;"></div>
             </div>
             <div class="modal-footer"><a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a></div>
        </div>
    </div>
</div>

<script type="text/javascript">
	function search_entries() {
		var kwd = $.trim($('#search-kwd').val());
		$.post('{php echo $this->createWebUrl('query');}', {keyword: kwd}, function(dat){
			$('#module-menus').html(dat);
		});
	}
	function select_entry(o) {
		$("#modal-module-menus .close").click();
		$('.reply-news-list-cover img').attr('src', o.thumb);
		$('.reply-news-list-detail .title').html("<strong>"+ o.title + "</strong>");
		$('.reply-news-list-detail .content').html(o.description);
		$('#new-reply').removeClass('hide');
		$(':hidden[name="activity"]').val(o.mid);
	}
</script>
